﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace MessageRouter.ServiceBroker.Configuration
{
    internal sealed class ServiceBrokerConfigurationSection : ConfigurationSection
    {
        const string behaviorsPropertyName = "behaviors";

        private static readonly ConfigurationProperty behaviorsProperty = new ConfigurationProperty(behaviorsPropertyName, typeof(ServiceBrokerBehaviorConfigurationElementCollection));

        private static readonly ConfigurationPropertyCollection properties;

        [ConfigurationProperty(behaviorsPropertyName)]
        internal ServiceBrokerBehaviorConfigurationElementCollection Behaviors
        {
            get { return (ServiceBrokerBehaviorConfigurationElementCollection)base[behaviorsProperty]; }
        }

        protected override ConfigurationPropertyCollection Properties
        {
            get { return properties; }
        }

        internal ServiceBrokerConfigurationSection() { }

        static ServiceBrokerConfigurationSection()
        {
            properties = new ConfigurationPropertyCollection
            {
                behaviorsProperty,
            };
        }

    }
}
